//
//  ViewController.m
//  06-Homework
//
//  Created by dllo on 16/7/21.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"qq登录";
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.110 green:0.659 blue:0.949 alpha:1.000];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
//    UIButton *btnLeft = [UIButton buttonWithType:UIButtonTypeSystem];
//    btnLeft.frame = CGRectMake(10, 10, 50, 50);
//    [btnLeft setImage:[UIImage imageNamed:@"4e4a20a4462309f7825abc48740e0cf3d7cad6b6"] forState:UIControlStateNormal];
//    btnLeft.layer.cornerRadius = 25;
    UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"1"]];
    img.layer.cornerRadius = 20;
    UIBarButtonItem *backItem= [[UIBarButtonItem alloc] initWithCustomView:img];
    self.navigationItem.leftBarButtonItem = backItem;
    
    UISegmentedControl *seg = [[UISegmentedControl alloc] initWithItems:@[@"消息", @"电话"]];
    seg.frame = CGRectMake(0, 0, 150, 44);
    self.navigationItem.titleView = seg;
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(rightAdd:)];
}
- (void)leftBtn:(UIBarButtonItem *)leftBtn {
    
}
- (void)rightAdd:(UIBarButtonItem *)rightBtn {
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
